<include file="Public/header"/>

		<div id="app">
			<!-- sidebar -->
			<include file="Public/left"/>
			<!-- / sidebar -->
			<div class="app-content">
				<!-- start: TOP NAVBAR -->
				<include file="Public/headernav"/>
				<!-- end: TOP NAVBAR -->
				<div class="main-content" >
					<div class="wrap-content container" id="container">
						<!-- start: PAGE TITLE -->
						<section id="page-title">
							<div class="row">
								<div class="col-sm-8">
									<h1 class="mainTitle">首页产品展示</h1>
									
								</div>
								<nav id="cl-effect-10" class="links cl-effect-10">
											<a data-hover="新增" href="{:U('admin/ad/ad_home_edit')}"><span>新增</span></a>
											
								</nav>
							</div>
						</section>
						<!-- end: PAGE TITLE -->
						<!-- start: YOUR CONTENT HERE -->

<style type="text/css">
	.class_hidden{display:none;}
   .panel-body{padding: 5px;}
   .panel-heading{padding: 5px;min-height: 25px;}
</style>						
<div class="row">
<div class="col-lg-12 col-md-12 margin-top-20" >
	<div class="panel panel-white">
		<div class="panel-heading">
			<h5 class="panel-title">筛选</h5>
		</div>
	<form role="form" class="form-inline">	
		<div class="panel-body">
				<div class="form-group">
					  <label for="title" class="sr-only">
					  </label>
						<input type="text" name="title" value="{$_GET.title}" id="title" placeholder="标题" class="form-control">
				</div>
				 <div class="form-group">
					<label for="status" class="sr-only">
						状态
					</label>
					<select class="form-control" id="status" name="status">
<option value="all" <if condition="$_GET['status'] =='all'">selected</if>>全部状态</option>
<option value="1" <if condition="$_GET['status'] =='1'">selected</if>>有效</option>
<option value="0" <if condition="$_GET['status'] ==='0'">selected</if>>无效</option>
					</select>
				</div>	
				 <div class="form-group">
					<label for="type" class="sr-only">
						类型
					</label>
					<select class="form-control" id="type" name="type">
<option value="">全部类型</option>
<volist name="type_arr" id="vo">
<option value="{$key}" <if condition="$_GET['type'] ==$key">selected</if>>{$vo}</option>
</volist>
					</select>
				</div>
				<div class="form-group ">
					<button class="btn btn-primary" type="submit">
						提交
					</button>
				</div>
		</div>
    </form>
	</div>
</div>
		</div>	

<table class="table table-striped table-hover" id="sample-table-2">
				<thead>
					<tr>
						<th class="center"></th>
						<th>排序</th>
						<th>标题</th>
						<th>类型</th>
						<th>开始时间</th>
						<th>结束时间</th>
						<th>状态</th>
						<th>新增时间</th>
						<th></th>
					</tr>
				</thead>
				<tbody>
      <volist  name="list['list']" id='vo' key='key'>
					<tr>
						<td class="center">
							<img src="{$vo.image_path}" class="img-rounded" style="max-width:50px;max-height:50px;" alt="无图片">
						</td>
						<td>{$vo.sort}</td>
						<td >{$vo.title}</td>
						<td >{$type_arr[$vo['type']]}</td>
						<td>{$vo.start_time|date="Y-m-d H:i:s",###}</td>
						<td>{$vo.end_time|date="Y-m-d H:i:s",###}</td>
						<td>
						{$vo['status']?'有效':'无效'}	
						</td>

						<td>
						{$vo.add_time|date="Y-m-d H:i:s",###}	
						</td>
						
						<td class="center">
						<div class="visible-md visible-lg hidden-sm hidden-xs">
							
							<a href="{:U("Admin/Ad/ad_home_edit",array('id'=>$vo['id'],'type'=>$vo['type']))}" class="btn btn-transparent btn-xs" tooltip-placement="top" data-toggle="tooltip" data-original-title="编辑"><i class="fa fa-pencil"></i></a>

							<a href="{:U("Admin/Ad/ad_home_del",array('id'=>$vo['id']))}" class="btn btn-transparent btn-xs tooltips" tooltip-placement="top" data-toggle="tooltip" data-original-title="删除"><i class="fa fa-times fa fa-white" onclick="return confirm('确定删除该数据？')"></i></a>
							
						</div>
						</td>
					</tr>
					
</volist>



		
				</tbody>
			</table>

<div class="col-md-12 pages" align="center">{$list['page']|default='暂无数据'}</div>


						<!-- end: YOUR CONTENT HERE -->
					</div>
				</div>
			</div>
			<!--  FOOTER and SETTINGS -->
			
           <include file="Public/footer"/>
			<!-- end: FOOTER -->
			<!-- start: OFF-SIDEBAR -->
			
			<!-- end: OFF-SIDEBAR -->
			
		</div>
		<!-- start: MAIN JAVASCRIPTS -->
         <include file="Public/javascript"/>
		<!-- end: CLIP-TWO JAVASCRIPTS -->
	</body>
</html>
